res = [1]*10
for a1 in range(4):
    for b2 in range(4):
        for c3 in range(4):
            for d4 in range(4):
                for e5 in range(4):
                    for f6 in range(4):
                        for g7 in range(4):
                            for h8 in range(4):
                                for i9 in range(4):
                                    for j10 in range(4):
                                        if abs(b2 - e5) != 2:
                                            res[1] = 1
                                        if c3 == 0 and c3 != f6 and c3 != b2 and c3 != d4:
                                            res[2] = 1
                                        if c3 == 1 and f6 != c3 and f6 != c3 and f6 != d4:
                                            res[2] = 1
                                        if c3 == 2 and b2 != c3 and b2 != f6 and b2 != d4:
                                            res[2] = 1
                                        if c3 == 3 and d4 != c3 and d4 != f6 and d4 != b2:
                                            res[2] = 1
                                        if d4 == 0 and a1 == e5:
                                            res[3] = 1
                                        if d4 == 1 and b2 == g7:
                                            res[3] = 1
                                        if d4 == 2 and a1 == i9:
                                            res[3] = 1
                                        if d4 == 3 and f6 == j10:
                                            res[3] = 1
                                        if e5 == 0 and h8 == e5:
                                            res[4] = 1
                                        if e5 == 1 and d4 == e5:
                                            res[4] = 1
                                        if e5 == 2 and i9 == e5:
                                            res[4] = 1
                                        if e5 == 3 and g7 == e5:
                                            res[4] = 1
                                        if f6 == 0 and h8 == b2 and h8 == d4:
                                            res[5] = 1
                                        if f6 == 1 and h8 == a1 and h8 == f6:
                                            res[5] = 1
                                        if f6 == 2 and h8 == c3 and h8 == j10:
                                            res[5] = 1
                                        if f6 == 3 and h8 == e5 and h8 == i9:
                                            res[5] = 1
                                        for _ in range(10):
                                            print("123")


                                    


                                         


